package lar.system.engine;

import android.util.Log;

/**
 * This class monitors performance of various parts of the engine.
 * @author Roma
 *
 */
public class Monitor 
{
	//all time units are measured in milliseconds
	
	public static int FT=0; 		//frame time
	public static int DT=0; 		//draw time
	public static int LT=0; 		//loop time
	public static int ST=0; 		//sleep time
	public static int D_TE=0;		//draw terrain time
	public static int D_TR=0; 		//draw tracers FBO time
	public static int D_TX=0; 		//draw tracers to FBO time
	public static int D_SH=0; 		//draw shells time
	public static int D_TA=0; 		//draw tanks time
	public static int GFPS=0;		//graphics fps
	
	public static void LOG()
	{
		if(DT == 0) DT=1;
		if(MainProgram.gameLoop.getTicks() % 10 == 0)
		{
			String log = new String(
									" FT:" + FT +
									" DT:" + DT +
									" LT:" + LT +
									" ST:" + ST +
									" D_TE:" + D_TE +
									" D_TR:" + D_TR +
									" D_TX:" + D_TX +
									" D_SH:" + D_SH +
									" D_TA:" + D_TA +
									" GFPS:" + GFPS );
									
			Log.d("R", log);
		}
		
	}
	
}
